﻿@model DotaHelp.Models.Guide
           
@{
    ViewBag.Title = Model.Title + " | " + Model.Hero.Name + "|" + Model.Hero.Nickname + " | Dota " + Model.Version;
    ViewBag.Meta_description = "Гайд по " + Model.Hero.Name + "(" + Model.Hero.Nickname + ")" + " - Dota " + Model.Version;
    ViewBag.Meta_keywords = "DotaHelp, dota, гайд, " + Model.Hero.Name + ", Dota " + Model.Version + ", " + Model.Hero.Nickname;
}

@Html.CreateUserButton(Model.Author, Model.Password)  
<h2>   
    Гайд "@Model.Title" от <span style="font-size:smaller;color:gray">@Html.ShowUserName(Model.Author)</span> (для доты @Model.Version)  @Html.Raiting("Guides", Model.Id, Model.Rating) 
</h2>
  

<div style="position:fixed; left:0px;top:60px;padding:0px">
    @Html.LinkOnHero(Model.Hero) <br />
    &nbsp;<a href="#comment"><b>Отзывы</b></a>   
</div>



<div id="GuideBody">
    @Html.ReplaceKeyOnContent((string)ViewBag.CorrectText, false, false)
</div>

<div style="clear:left"></div>

@if (!string.IsNullOrWhiteSpace(Model.Source))
{
    <p>
        Источник: <a href="@Model.Source">@Model.Source</a>
    </p>
}

@if (!Request.IsAuthenticated)
{
    <div style="padding:5px; margin:5px">
        <script type="text/javascript">
            $(function () {
                $("#ChangeGuide").bind("click", function () {
                    var p = prompt("Введи пароль для доступа к гайду", "Пароль");
                    if (p != "") {
                        window.location = "/EditGuide/@Model.Id/" + p;
                    }
                });
            });
        </script>     
        <p>
            <input type="button" value="Редактировать" id="ChangeGuide" />
        </p>    
    </div>
}
else
{
    <p>
        <b>Теперь випы могут редактировать чужие гайды!</b>
        @Html.ActionLink("Редактировать", "Edit", new { id = Model.Id })
    </p>
}


<h3>Отзывы:</h3>
@Html.Comments(Model.Title, Url.RouteUrl("Guide", new { id = Model.Id }), Model.Hero.AvatarImageId)



@*marketgid.com Информер_1_17.06.2012 25766 Медиа-информер *@
<script type="text/javascript">
    var MGCD = new Date();
    var min_width = '301';
    var min_height = '201';
    var overlay_interval = '40';
    var overlay_height = '55';
    var mg_opacity = '0.8';
    var mg_bgcolor = '#353535';

    document.write('<scr'
+ 'ipt type="text/javascript"'
+ ' src="http://jsc.dt00.net/d/o/dotahelp.ru.25766.js?t='
+ MGCD.getYear()
+ MGCD.getMonth()
+ MGCD.getDay()
+ MGCD.getHours()
+ '" charset="windows-1251"></scr' + 'ipt>');
</script>